import { request } from '@boeyo/portal';

//设备型号列表
export const getModelList = (params?: any) => {
  return request({
    url: 'deviceModel/list',
    method: 'GET',
    params,
  });
};
//新增设备型号
export const addModel = (data: any) => {
  return request({
    url: 'deviceModel/add',
    method: 'POST',
    data,
  });
};
//更新设备型号
export const updateModel = (data: any) => {
  return request({
    url: 'deviceModel/update',
    method: 'PUT',
    data,
  });
};
//删除设备型号
export const deleteModel = (ids: number[]) => {
  return request({
    url: `deviceModel/delete/${ids}`,
    method: 'DELETE',
  });
};

/**
 * 获取设备厂商下拉框数据
 */
export const getDeviceManufacturerSelect = (type) => {
  return request({
    url: '/manufacturer/selectList?type=' + type,
    method: 'GET',
  });
};
